<html>
<head>
<link rel="stylesheet" href="/static/diary.css" type="text/css">
</head>

<body>
<h1>Project List</h1>

{% if errors %}
<ul>
{% for error in errors %}
<li>{{error}}</li>
{% endfor %}
</ul>
{% endif %}

<form action="/project/" method="post">
{% csrf_token %}
<table border='0' cellspacing='0' cellpadding='0'>
<tr><th>&nbsp;</th><th>项目名称</th><th>开始时间</th><th>项目简介</th><th>成员列表</th></tr>
{% for pj in pj_list %}
<tr>
    <td><input type="checkbox" name="pj_del" value={{pj.name}}></input></td>
    <td>{{pj.name}}</td>
    <td>{{pj.startdate}}</td>
    <td>{{pj.memo}}</td>
    <td>
        {% for mb in pj.member.all %}
        <label>{{mb.name}}</label>
        {% endfor %}
    </td>
</tr>
{% endfor %}
</table>
<input type="submit" name="op" value="del"></input>
<br/><br/>

<table border="0" cellspacing="0" cellpading="0">
<tr><th>项目名称</th><td><input type="text" name="pj_name"></td></tr>
<tr><th>开始时间</th><td><input type="text" name="pj_startdate"></td></tr>
<tr><th>项目简介</th><td><input type="text" name="pj_memo"></td></tr>
<tr><th>成员列表</th>
    <td><select name="pj_member" multiple="multiple">
    {% for ey in ey_list %}
        <option value="{{ey}}">{{ey}}</option>
    {% endfor %}
     </select></td></tr>
</table>
<input type="submit" name="op" value="add"></input>
</form>

</body>
</html>
